package com.ss.android.article.base.feature.search;

import android.content.DialogInterface;

import com.ss.android.article.base.feature.app.b.DBHelper;
import com.ss.android.common.lib.MobClickCombiner;

final class c implements DialogInterface.OnClickListener {
    private final a a;

    c(a arg1) {
        this.a = arg1;

    }

    public final void onClick(DialogInterface arg4, int arg5) {
        if(this.a.isViewValid()) {
            if(this.a.c() == 0) {
                MobClickCombiner.onEvent(this.a.getActivity(), "search_tab", "clear_history_sure");
            }
            else if(this.a.c() == 2) {
                MobClickCombiner.onEvent(this.a.getActivity(), "sub_search_tab", "clear_history_confirm");
            }

            this.a.c.dismissDropDown();
            DBHelper.getInstance(this.a.a).a(this.a.c());
            this.a.j();
        }
    }
}

